package com.milo.java7.bean;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.BeanUtils;

/**
 * @Auther: Milogenius
 * @Date: 2019/3/25 22:11
 * @Description:
 */
public class AnimalTest {
    public static void main(String[] args) {
        Animal animal = new Animal();
        animal.setAge(8);
        animal.setName("球球");

        Dog dog = new Dog();

        System.out.println("dog赋值前:" + JSONObject.toJSONString(dog));
        BeanUtils.copyProperties(animal, dog);
        System.out.println("dog赋值后:" + JSONObject.toJSONString(dog));

    }
}
